﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MacroRecorder.Macro.EventParam;

namespace MacroRecorder.Macro.Events
{
    public class MacroEvent_InputBarcode : IMacroEvent
    {
        public int EventIndex { get; set; }

        public void ExecuteEvent()
        {
            System.Windows.Forms.SendKeys.SendWait("^v"); ;
        }

        public string GetEventString()
        {
            return "InputBarCode";
        }

        public string GetEventType()
        {
            return "InputBarCode";
        }

        public BaseParam GetParam()
        {
            var bp = new InputBarcodeParam
            {
                Index = EventIndex,
                EnumType = (byte)MacroEventType.InputBarCode,
            };
            return bp;
        }

        public void SetParam(BaseParam param)
        {
            EventIndex = param.Index;
        }
    }
}
